package com.zhima.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zhima.enums.UserQuestionState;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 记录用户做题记录
 * </p>
 *
 * @author zhima
 * @since 2023-08-25
 */
@Data
@TableName("oj_user_question")
@ApiModel(value = "OjUserQuestion对象", description = "")
public class OjUserQuestion implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("ac表id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("最后一次提交时间")
    @TableField("last_submit_time")
    private Date lastSubmitTime;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("题目id")
    @TableField("question_id")
    private Long questionId;

    @ApiModelProperty("1是AC 0是WA")
    @TableField("ac")
    private UserQuestionState ac;

    @ApiModelProperty("提交次数")
    @TableField("submit_num")
    private Integer submitNum;

    @ApiModelProperty("ac次数")
    @TableField("ac_num")
    private Integer acNum;
}
